package com.cgb2110.serve.service;

import com.cgb2110.serve.pojo.Admin;
import com.cgb2110.serve.pojo.Menu;
import com.cgb2110.serve.pojo.RespBean;
import com.cgb2110.serve.pojo.Role;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Larry
 * @since 2021-12-20
 */

public interface IAdminService  {
    /**
     * 登录之后返回token
     *
     * @param username
     * @param password
     * @param request
     * @return
     */
    RespBean login(String username, String password, HttpServletRequest request);

    /**
     * 根据用户名获取用户
     * @param username
     * @return
     */
    Admin getAdminByUserName(String username);

    List<Role> getRoles(Integer adminId);

    /**
     * 获取所有操作员
     * @param keywords
     * @return
     */
    List<Admin> getAllAdmins(String keywords);

    RespBean updateAdminPassword(String oldPass, String pass, Integer adminId);
}
